package com.cl.pattern.interpreter;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName: Client
 * @Description: 解释器模式
 *
 */
public class Client {

    public static void main(String[] args) {
        Context context = new Context();
        List<AbstractExpression> list = new ArrayList<AbstractExpression>();

        list.add(new TerminalExpression());
        list.add(new NonterminalExpression());
        list.add(new TerminalExpression());
        list.add(new TerminalExpression());

        for (AbstractExpression abstractExpression : list) {
            abstractExpression.Interpret(context);
        }
    }

}
